<%@ Assembly Name="Microsoft.SharePoint.ApplicationPages, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%> <%@ Page Language="C#" DynamicMasterPageFile="~masterurl/default.master" Inherits="Microsoft.SharePoint.WebControls.LayoutsPageBase"       %> <%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormSection" src="~/_controltemplates/InputFormSection.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormControl" src="~/_controltemplates/InputFormControl.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="ButtonSection" src="~/_controltemplates/ButtonSection.ascx" %>
<%@ Register Tagprefix="wssawc" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<script runat="server">
string L_GeneralError_Text = "An error has occurred.";
SPSite spServer;
SPWeb spWeb;
string strHttpPath;
bool bValidBrowser = false;
string strCannotCreateWebPage;
string strFromDocLibID;
string strFromDocLibName = null;
string strFromDocLibURL = null;
bool bFromValidDocLib = false;
string strFromRelativeFolderPath = null;
bool bFromValidFolder = false;
bool bDocLibAvailable = false;

private void Page_Load(Object sender, EventArgs e)
{
	try
	{
		spWeb = SPControl.GetContextWeb(Context);
		spServer = SPControl.GetContextSite(Context);
		bValidBrowser = SPUtility.IsUplevelBrowser(Context);
		strFromDocLibID = Request.QueryString.Get("List");
		strFromDocLibName = null;
		strFromDocLibURL = null;
		bFromValidDocLib = false;
		SPList spList = null;

		if (strFromDocLibID != null)
		{
			spList = spWeb.Lists[new Guid(strFromDocLibID)];
			strFromDocLibName = spList.Title;
			strFromDocLibURL = spServer.MakeFullUrl(spList.DefaultViewUrl);
			if ((spList.BaseType == SPBaseType.DocumentLibrary) &&
				(spList.BaseTemplate == SPListTemplateType.DocumentLibrary || spList.BaseTemplate == SPListTemplateType.PictureLibrary))
			{
				bFromValidDocLib = true;
			}
			PageTarget = spList;
		}
		if (bFromValidDocLib)
		{
			strFromRelativeFolderPath = Request.QueryString["RootFolder"];
			string listRootFolder = spList.RootFolder.ServerRelativeUrl;
			if (!String.IsNullOrEmpty(strFromRelativeFolderPath))
			{
				if (strFromRelativeFolderPath.StartsWith(listRootFolder) &&
					strFromRelativeFolderPath != listRootFolder)
				{
					strFromRelativeFolderPath = strFromRelativeFolderPath.Substring(listRootFolder.Length + 1);
					bFromValidFolder = true;
				}
			}
		}
		if (!bFromValidFolder)
		{
			strFromRelativeFolderPath = Request.QueryString.Get("FolderName");
			if (!String.IsNullOrEmpty(strFromRelativeFolderPath))
			{
				bFromValidFolder = true;
			}
		}
		bDocLibAvailable = false;
		 // Make sure that the user is authenticated
		SPUtility.EnsureSessionCredentials(SPSessionCredentialsFlags.RequireAuthentication);
		if (Page.IsPostBack)
		{			
			CreateWebPartPage();
		}
	}
	catch
	{
		Context.Server.Transfer("error.aspx?ErrorText=" + SPEncode.UrlEncode(L_GeneralError_Text));
		return;
	}
}
private void SubmitBtn_Click(Object sender, EventArgs e)
{
	try
	{
		CreateWebPartPage();
	}
	catch
	{
		Context.Server.Transfer("error.aspx?ErrorText=" + SPEncode.UrlEncode(L_GeneralError_Text));
		return;
	}
}
private void CreateWebPartPage()
{
	spWeb = SPControl.GetContextWeb(Context);
	string templateName = Request.Form["WebPartPageTemplate"];
	// Validate the source file name
	if (templateName == null)
	{
		Context.Server.Transfer("error.aspx?ErrorText=" + SPEncode.UrlEncode(L_GeneralError_Text));
		return;
	}
	templateName = templateName.Trim();  // get rid of white spaces
	if (templateName.Length == 0)
	{
		Context.Server.Transfer("error.aspx?ErrorText=" + SPEncode.UrlEncode(L_GeneralError_Text));
		return;
	}
	templateName = templateName + ".aspx";
	if (templateName.Length > SPUtility.MaxLeafNameLength)
	{
		Context.Server.Transfer("error.aspx?ErrorText=" + SPEncode.UrlEncode(L_GeneralError_Text));
		return;
	}
	// Avoid characters like "..\..\" in the path 
	if (templateName != System.IO.Path.GetFileName(templateName))
	{
		Context.Server.Transfer("error.aspx?ErrorText=" + SPEncode.UrlEncode(L_GeneralError_Text));
		return;
	}
	// Validate target file name
	string fileName = Request.Form["Title"];
	if (fileName == null)
	{
		Context.Server.Transfer("error.aspx?ErrorText=" + SPEncode.UrlEncode(L_GeneralError_Text));
		return;
	}
	fileName = fileName.Trim();  // get rid of white spaces
	if (fileName.Length == 0)
	{
		Context.Server.Transfer("error.aspx?ErrorText=" + SPEncode.UrlEncode(L_GeneralError_Text));
		return;
	}
	// Avoid characters like "..\..\" in the path 
	if (fileName != System.IO.Path.GetFileName(fileName))
	{
		Context.Server.Transfer("error.aspx?ErrorText=" + SPEncode.UrlEncode(L_GeneralError_Text));
		return;
	}
	// Prepare the source file, assuming the Web Part Page templates live in <Installation Path>\Template\<LCID>\<web template>\doctemp\smartpgs
	string sourceFilePath = SPUtility.GetGenericSetupPath("Template\\") +
		spWeb.Language.ToString() + "\\" + spWeb.WebTemplate +
		"\\doctemp\\smartpgs\\";
	sourceFilePath = sourceFilePath + templateName;
	System.IO.StreamReader sr = new System.IO.StreamReader(sourceFilePath);
	string content = sr.ReadToEnd();
	// Assuming the Web Part Page template has a Title Bar Web Part with the title place holder "_TitlePlaceHolder_"
	content = content.Replace("_TitlePlaceHolder_", fileName);
	// Save the target file into the database
	fileName += ".aspx";
	string doclibID = Convert.ToString(Request.Form["List"]);
	Guid guidDocLib = new Guid(doclibID);
	SPList doclib = spWeb.Lists[guidDocLib];
	string folderPath = doclib.RootFolder.Url;
	string targetFilePath = spWeb.Url + "/" + folderPath + "/" + fileName;
	// Convert the string into UTF8 encoded bytes
	System.Text.UTF8Encoding encoding = new System.Text.UTF8Encoding();
	System.Byte[] contentBytes = encoding.GetBytes(content);
	System.Byte[] bytes = new System.Byte[contentBytes.Length + 3];
	// Adding UTF8 byte order mark
	bytes[0] = 0xEF;
	bytes[1] = 0xBB;
	bytes[2] = 0xBF;
	contentBytes.CopyTo(bytes, 3);
	SPFileCollection fileCollection = spWeb.Files;
	
	bool overwriteChecked = bool.Parse(Convert.ToString(Request.Form["Overwrite"]));
	if (overwriteChecked)
	{
		SPFile spFile = spWeb.GetFile(targetFilePath);
		if (spFile != null && spFile.Exists)
		{
			SPFolder spFolder = spWeb.GetFolder(folderPath);
			spFolder.Files.Delete(targetFilePath);
		}
	}
	fileCollection.Add(targetFilePath, bytes);
	// Redirect to the newly created Web Part Page, with the toolpane opened in the Add Web Parts view
	Response.Redirect(targetFilePath + "?PageView=Shared&DisplayMode=Design&InitialTabId=Ribbon.WebPartPage&VisibilityContext=WSSWebPartPage");
}
</script>
<asp:Content contentplaceholderid="PlaceHolderPageTitle" runat="server">
	<SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,webpagecreation_newwp_pagetitle%>" EncodeMethod='HtmlEncode'/>
</asp:Content>
<asp:content contentplaceholderid="PlaceHolderPageTitleInTitleArea" runat="server">
	<SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,webpagecreation_newwp_pagetitle%>" EncodeMethod='HtmlEncode'/>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderPageDescription" runat="server">
	<SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,webpagecreation_newwp_pagedescription%>" EncodeMethod='HtmlEncode'/>
</asp:Content>
<asp:content contentplaceholderid="PlaceHolderAdditionalPageHead" runat="server">
<% SPSite spServer = SPControl.GetContextSite(Context); SPWeb spWeb = SPControl.GetContextWeb(Context); %>
<head>
	<meta name="GENERATOR" content="Microsoft SharePoint"/>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<meta http-equiv="Expires" content="0"/>
	
	<title id="onetidTitle"><SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,pagetitle_sharepoint%>" EncodeMethod='HtmlEncode'/></title>
<SharePoint:CssLink runat="server"/>
	<SharePoint:Theme runat="server"/>
<SharePoint:ScriptLink name="init.js" language="javascript" runat="server" />
<SharePoint:ScriptLink name="core.js" language="javascript" runat="server" />
<SharePoint:CustomJSUrl runat="server" />
<link type="text/xml" rel='alternate' href="_vti_bin/spdisco.aspx" />
</head>
<script type="text/javascript">
// <![CDATA[
function ULSEhF(){var o=new Object;o.ULSTeamName="Microsoft SharePoint Foundation";o.ULSFileName="spcfql.aspx";return o;}
var strImagePath = "/_layouts/<%=System.Threading.Thread.CurrentThread.CurrentUICulture.LCID%>/images/";
var strWebUrl = <% SPHttpUtility.AddQuote(SPHttpUtility.UrlPathEncode(spWeb.Url,true),Response.Output);%>;
function DoValidateAndSubmit()
{ULSEhF:;
	var form = document.forms.<%SPHttpUtility.NoEncode(Form.ClientID,Response.Output);%>;
	form["Title"].value = TrimSpaces(form["Title"].value);
	if (form["Title"].value.length < 1)
	{
		var L_alert1_Text = "<SharePoint:EncodedLiteral runat='server' text='<%$Resources:wss,webpagecreation_L_alert1_Text%>' EncodeMethod='EcmaScriptStringLiteralEncode'/>";
		window.alert(L_alert1_Text);
		form["Title"].focus();
		return false;
	}
<%
	if (bFromValidDocLib == false)
	{
%>
	var index = form.onetidDocLibIDSelect.selectedIndex;
	var ListValue = form.onetidDocLibIDSelect.options[index].value;
	if (ListValue == "")
	{
		var L_NoDocumentLibary_Text = "<SharePoint:EncodedLiteral runat='server' text='<%$Resources:wss,webpagecreation_L_NoDocumentLibary_Text%>' EncodeMethod='EcmaScriptStringLiteralEncode'/>";
		alert(L_NoDocumentLibary_Text);
		return false;
	}
<%
		}
%>
	return true;
}
function DoTemplateOptionChange()
{ULSEhF:;
	var frmWebPage = document.forms.<%SPHttpUtility.NoEncode(Form.ClientID,Response.Output);%>;
	var index = frmWebPage.WebPartPageTemplate.selectedIndex;
	frmWebPage.PreviewImage.src = strImagePath + frmWebPage.WebPartPageTemplate.options[index].value + ".gif";
	frmWebPage.PreviewImage.alt = frmWebPage.WebPartPageTemplate.options[index].text;
}
function _spBodyOnLoad()
{ULSEhF:;
	var frmWebPage = document.forms.<%SPHttpUtility.NoEncode(Form.ClientID,Response.Output);%>;
	try{window.focus();frmWebPage['Title'].focus(); DoTemplateOptionChange();}catch(e){}
}
function _spFormOnSubmit()
{ULSEhF:;
	var frmWebPage = document.forms.<%SPHttpUtility.NoEncode(Form.ClientID,Response.Output);%>;
	frmWebPage.action=<% SPHttpUtility.AddQuote(SPHttpUtility.UrlPathEncode(strHttpPath,true),Response.Output); %>;
	return DoValidateAndSubmit();
}
// ]]>
</script>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
<% SPSite spServer = SPControl.GetContextSite(Context); SPWeb spWeb = SPControl.GetContextWeb(Context); %>
 <table  border="0" width="100%" cellspacing="0" cellpadding="0" id="Table2">
	<wssuc:InputFormSection runat="server"
		Title="<%$Resources:wss,webpagecreation_Name_Title%>"
		Description ="<%$Resources:wss,webpagecreation_newwp_name_description%>"
		TopBorder="False">
		<Template_InputFormControls>
			<wssuc:InputFormControl LabelText="<%$Resources:wss,multipages_Name%>" runat="server">
				<Template_Control>
					 <table border="0" cellspacing="1">
						<tr>
							<td nowrap="nowrap">
								<span dir="ltr">
								<input id="onetidListTitle" type="Text" title="<SharePoint:EncodedLiteral runat='server' text='<%$Resources:wss,webpagecreation_name_title%>' EncodeMethod='HtmlEncode'/>" name="Title" maxlength="123"/> <span dir="ltr" class="ms-authoringcontrols">.aspx</span>
								</span>
							</td>
						</tr>
						<tr>
							<td class="ms-authoringcontrols" nowrap="nowrap">
								<input type="Hidden" name="Overwrite" id="Overwrite" value="false" />
								  <script type="text/javascript">
								  function setOverwrite()
								  {ULSEhF:;
									 if (document.getElementById("OverwriteCheckBox").checked)
										 document.getElementById("Overwrite").value = "true";
									 else
										 document.getElementById("Overwrite").value = "false";
								  }
								  </script>
								<input type="checkbox" name="OverwriteCheckBox" id="OverwriteCheckBox" title="<SharePoint:EncodedLiteral runat='server' text='<%$Resources:wss,webpagecreation_overwrite%>' EncodeMethod='HtmlEncode'/>" value="true" onclick="setOverwrite()" />
								<label for="OverwriteCheckBox" style="vertical-align:middle">
								<SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,webpagecreation_overwrite_text%>" EncodeMethod='HtmlEncode'/>
								</label>
							</td>
						</tr>
					</table>
				</Template_Control>
			</wssuc:InputFormControl>
		</Template_InputFormControls>
	</wssuc:InputFormSection>
	<!-- Layout -->
	<wssuc:InputFormSection runat="server"
		Title="<%$Resources:wss,webpagecreation_layout_title%>"
		>
		<Template_Description>
			<table border="0" cellpadding="1" cellspacing="0">
				<tr>
					<td class="ms-descriptiontext">
						<SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,webpagecreation_layout_description%>" EncodeMethod='HtmlEncode'/>
					</td>
				</tr>
				<tr><td class="ms-descriptiontext" height="20"><img src="/_layouts/images/blank.gif" width='1' height='1' alt="" /></td></tr>
				<tr><td align="center" class="ms-descriptiontext" height="6"><img name="PreviewImage" /></td></tr>
				<tr><td class="ms-descriptiontext" height="6"><img src="/_layouts/images/blank.gif" width='1' height='1' alt="" /></td></tr>
			</table>
		</Template_Description>
		<Template_InputFormControls>
			<wssuc:InputFormControl runat="server"
				LabelText="<%$Resources:wss,webpagecreation_layout_choosetemplate%>"
				>
				<Template_Control>
							 <select id="onetidWebPartPageTemplate" name="WebPartPageTemplate" size="8" onchange="DoTemplateOptionChange()">
							   <option value="spstdql2" selected="true"><SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,webpagecreation_layout_option2%>" EncodeMethod='HtmlEncode'/></option>
							   <option value="spstdql1"><SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,webpagecreation_layout_option1%>" EncodeMethod='HtmlEncode'/></option>
							   <option value="spstdql3"><SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,webpagecreation_layout_option3%>" EncodeMethod='HtmlEncode'/></option>
							   <option value="spstdql4"><SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,webpagecreation_layout_option4%>" EncodeMethod='HtmlEncode'/></option>
							   <option value="spstdql5"><SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,webpagecreation_layout_option5%>" EncodeMethod='HtmlEncode'/></option>
							   <option value="spstdql6"><SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,webpagecreation_layout_option6%>" EncodeMethod='HtmlEncode'/></option>
							   <option value="spstdql7"><SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,webpagecreation_layout_option7%>" EncodeMethod='HtmlEncode'/></option>
							   <option value="spstdql8"><SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,webpagecreation_layout_option8%>" EncodeMethod='HtmlEncode'/></option>
							 </select>
				</Template_Control>
			</wssuc:InputFormControl>
		</Template_InputFormControls>
	</wssuc:InputFormSection>
	<!-- Save Location -->
<%
	if (bFromValidDocLib == false)
	{
%>
	<wssuc:InputFormSection runat="server"
		Title="<%$Resources:wss,webpagecreation_save_title%>"
		Description="<%$Resources:wss,webpagecreation_newwp_save_description%>"
		>
		<Template_InputFormControls>
			<wssuc:InputFormControl runat="server"
				LabelText="<%$Resources:wss,webpagecreation_doclib%>"
				>
				<Template_Control>
					   <table border="0" cellspacing="1" id="Table8">
						 <tr>
						   <td>
<%
	SPListCollection spLists = spWeb.Lists;
		int iIndex = 0;
		System.Collections.Generic.SortedList<string, SPList> assetLibs = new System.Collections.Generic.SortedList<string, SPList>();
		System.Collections.Generic.SortedList<string, SPList> notAssetLibs = new System.Collections.Generic.SortedList<string, SPList>();
		for (int i = 0 ;i < spLists.Count ;i++)
		{
			SPList spList = spLists[i];
			SPDocumentLibrary spDocLib = spList as SPDocumentLibrary;
			if ((!spList.Hidden) && (spList.BaseType == SPBaseType.DocumentLibrary) && spDocLib != null && !spDocLib.IsCatalog && (spList.BaseTemplate != SPListTemplateType.PictureLibrary))
			{
				bool bHasPermission = false;
				bool oldState = SPSecurity.CatchAccessDeniedException;
				try
				{
					SPSecurity.CatchAccessDeniedException = false;
					bHasPermission = spList.DoesUserHavePermissions(SPBasePermissions.AddListItems);
				}
				catch (UnauthorizedAccessException)
				{
				}
				finally
				{
					SPSecurity.CatchAccessDeniedException = oldState;
				}
				if (bHasPermission)
				{
					bDocLibAvailable = true;
					if (spList.IsSiteAssetsLibrary)
					{
						assetLibs.Add(spList.Title, spList);
					}
					else
					{
						notAssetLibs.Add(spList.Title, spList);
					}
				}
			}
		}
				foreach(System.Collections.Generic.KeyValuePair<string, SPList> oneEntry in assetLibs)
				{
					if (iIndex == 0)
					{
%>
							 <select id="onetidDocLibIDSelect" name="List" title="<SharePoint:EncodedLiteral runat='server' text='<%$Resources:wss,webpagecreation_doclib%>' EncodeMethod='HtmlEncode'/>">
<%
					}
					SPList oneEntryValue = oneEntry.Value as SPList;
					if (oneEntryValue != null)
					{
%>
							   <option value="<% SPEncode.WriteHtmlEncode(Response, (oneEntryValue as SPList).ID.ToString()); %>" <% if(iIndex == 0){%> selected="true"<%}%>><% SPEncode.WriteHtmlEncode(Response, oneEntry.Key); %></option>
<%                  }
					iIndex++;
				}
				foreach(System.Collections.Generic.KeyValuePair<string, SPList> oneEntry in notAssetLibs)
				{
					if (iIndex == 0)
					{
%>
							 <select id="onetidDocLibIDSelect" name="List" title="<SharePoint:EncodedLiteral runat='server' text='<%$Resources:wss,webpagecreation_doclib%>' EncodeMethod='HtmlEncode'/>">
<%
					}
					SPList oneEntryValue = oneEntry.Value as SPList;
					if (oneEntryValue != null)
					{
%>
							   <option value="<% SPEncode.WriteHtmlEncode(Response, (oneEntryValue as SPList).ID.ToString()); %>" <% if(iIndex == 0){%> selected="true"<%}%>><% SPEncode.WriteHtmlEncode(Response, oneEntry.Key); %></option>
<%                  }
					iIndex++;
				}
		if (iIndex == 0)
		{
%>
							 <select id="onetidDocLibIDSelect" name="<SharePoint:EncodedLiteral runat='server' text='<%$Resources:wss,webpagecreation_save_list%>' EncodeMethod='HtmlEncode'/>" disabled="disabled" >
							   <option selected="true"><SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,webpagecreation_save_noneavail%>" EncodeMethod='HtmlEncode'/></option>
<%
		}
%>
							 </select>
						   </td>
						 </tr>
<%
		if (iIndex == 0 && spWeb.DoesUserHavePermissions(SPBasePermissions.ManageLists))
		{
%>
						 <tr>
						   <td class="ms-authoringcontrols">
							 <SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,webpagecreation_save_create%>" EncodeMethod='HtmlEncode'/> <a href="new.aspx?ListTemplate=101&ListBaseType=1" id="A1"><SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,webpagecreation_save_doclib%>" EncodeMethod='HtmlEncode'/></a>
						   </td>
						 </tr>
<%
		}
%>
					   </table>
				</Template_Control>
			</wssuc:InputFormControl>
		</Template_InputFormControls>
	</wssuc:InputFormSection>
<%
	}
	else
	{
%>
				   <input id="onetidDocLibIDSelect" type="Hidden" name="List" value=<%SPHttpUtility.AddQuote(SPHttpUtility.HtmlEncode(strFromDocLibID),Response.Output);%> />
<%
	}
	if (bFromValidFolder)
	{
%>
				   <input id="onetidFolder" type="Hidden" name="RelativeFolderPath" value=<%SPHttpUtility.AddQuote(SPHttpUtility.HtmlEncode(strFromRelativeFolderPath),Response.Output);%> />
<%
	}
%>
	<wssuc:ButtonSection runat="server">
		<Template_Buttons>
		<asp:PlaceHolder runat="server">
		<input id="onetidCreate" class="ms-ButtonHeightWidth" type="submit" <% if (!bDocLibAvailable && !bFromValidDocLib) { %> DISABLED <% } %> value="<SharePoint:EncodedLiteral runat='server' text='<%$Resources:wss,multipages_createbutton_text%>' EncodeMethod='HtmlEncode'/>" accesskey="<SharePoint:EncodedLiteral runat='server' text='<%$Resources:wss,okbutton_accesskey%>' EncodeMethod='HtmlEncode'/>" />
		</asp:PlaceHolder>
		</Template_Buttons>
	</wssuc:ButtonSection>
	   <input id="onetidID" type="Hidden" name="ID" value="New" />
	   <input id="onetidCmd" type="Hidden" name="Cmd" value="NewWebPage" />
	   <input id="onetidWebPageType" type="Hidden" name="Type" value="WebPartPage" />
 </table>
 <span name="frmWebPage" id="frmWebPage" Action="?cs=65001"></span>
</asp:Content>
<%@ Register TagPrefix="wssuc" TagName="TopNavBar" src="~/_controltemplates/TopNavBar.ascx" %>
<asp:Content contentplaceholderid="PlaceHolderTopNavBar" runat="server">
  <wssuc:TopNavBar id="IdTopNavBar" runat="server" Version="4" ShouldUseExtra="true"/>
</asp:Content>
<asp:Content contentplaceholderid="PlaceHolderHorizontalNav" runat="server"/>
<asp:Content contentplaceholderid="PlaceHolderSearchArea" runat="server"/>
<asp:Content contentplaceholderid="PlaceHolderTitleBreadcrumb" runat="server">
  <SharePoint:UIVersionedContent UIVersion="3" runat="server"><ContentTemplate>
	<asp:SiteMapPath
		SiteMapProvider="SPXmlContentMapProvider"
		id="ContentMap"
		SkipLinkText=""
		NodeStyle-CssClass="ms-sitemapdirectional"
		RootNodeStyle-CssClass="s4-die"
		PathSeparator="&#160;&gt; "
		PathSeparatorStyle-CssClass = "s4-bcsep"
		runat="server" />
  </ContentTemplate></SharePoint:UIVersionedContent>
  <SharePoint:UIVersionedContent UIVersion="4" runat="server"><ContentTemplate>
	<SharePoint:ListSiteMapPath
		runat="server"
		SiteMapProviders="SPSiteMapProvider,SPXmlContentMapProvider"
		RenderCurrentNodeAsLink="false"
		PathSeparator=""
		CssClass="s4-breadcrumb"
		NodeStyle-CssClass="s4-breadcrumbNode"
		CurrentNodeStyle-CssClass="s4-breadcrumbCurrentNode"
		RootNodeStyle-CssClass="s4-breadcrumbRootNode"
		HideInteriorRootNodes="true"
		SkipLinkText="" />
  </ContentTemplate></SharePoint:UIVersionedContent>
</asp:Content>
